namespace Triton.Game.Mapping
{
	public struct Vector3
	{
		public float X;

		public float Y;

		public float Z;

		public override string ToString()
		{
			return $"{X},{Y},{Z}";
		}

		public Vector3(float x, float y, float z)
		{
			X = x;
			Y = y;
			Z = z;
		}

		public override bool Equals(object obj)
		{
			if (obj is Vector3)
			{
				return this == (Vector3)obj;
			}
			return false;
		}

		public override int GetHashCode()
		{
			return X.GetHashCode() ^ Y.GetHashCode() ^ Z.GetHashCode();
		}

		public static bool operator ==(Vector3 lhs, Vector3 rhs)
		{
			if (lhs.X.Equals(rhs.X) && lhs.Y.Equals(rhs.Y))
			{
				return lhs.Z.Equals(rhs.Z);
			}
			return false;
		}

		public static bool operator !=(Vector3 x, Vector3 y)
		{
			return !(x == y);
		}
	}
}
